#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int Fact(int n)
{
	if (n == 0)
		return 1;
	else
	{
		int sum = 1;
		for (int i = 1;i <= n;i++)
		{
			sum = i * sum;
		}
		return sum;
	}
}
int main()
{
	int n = 0;
	scanf("%d", &n);
	int ret = Fact(n);
	printf("%d\n", ret);
	return 0;
}